﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.LightSwitch;
using LightSwitchApplication.UserCode;
namespace LightSwitchApplication
{
    public partial class trStakeholderCustomProperty
    {
        partial void PrintableValue_Compute(ref string result)
        {
            if (this.tlCustomProperty == null)
            {
                result = "";
                return;
            }

            if (this.tlCustomProperty.IsChooseable)
            {
                if (this.tlCustomPropertyChoices != null)
                {
                    result = this.tlCustomPropertyChoices.Name;
                }
                else
                    result = "";
            }
            else
                result = this.CustomPropertyValue;
        }

        partial void tlCustomPropertyChoices_Validate(EntityValidationResultsBuilder results)
        {
            CustomPropertiesHandling handle = new CustomPropertiesHandling(this.tlCustomProperty, this.tlCustomPropertyChoices, this.CustomPropertyValue);
            handle.tlCustomPropertyChoices_Validate(results);

        }

        partial void CustomPropertyValue_Validate(EntityValidationResultsBuilder results)
        {
            CustomPropertiesHandling handle = new CustomPropertiesHandling(this.tlCustomProperty, this.tlCustomPropertyChoices, this.CustomPropertyValue);
            handle.CustomPropertyValue_Validate(results);

        }
    }
}
